package com.wimcorp.magic.abilities;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.wimcorp.magic.abilities.trigger.AbilityTrigger;
import com.wimcorp.magic.exception.CastException;
import com.wimcorp.magic.input.Condition;
import com.wimcorp.magic.phase.Turn;

/**
 * 
 * condition : KICKER
 * 
 * 
 */
@Entity
@Table(name = "kickerability", schema = "abilities")
public class KickerAbility extends ConditionAbility {

	@Transient
	private boolean kicked;

	protected KickerAbility() {
	}

	public KickerAbility(AbilityTrigger trigger, Ability nonConditionAbility, Ability conditionAbility) {
		super(trigger, nonConditionAbility, conditionAbility,Condition.KICKER);
	}

	public KickerAbility(KickerAbility ability) {
		super(ability);
	}

	private boolean isConditionFullFilled() {

		switch (getCondition()) {
		case KICKER:
			return kicked;
		}
		return false;
	}

	public boolean isKicked() {
		return kicked;
	}

	public void setKicked(boolean kicked) {
		this.kicked = kicked;
	}

	@Override
	public KickerAbility clone() {
		return new KickerAbility(this);
	}

}
